<template>
  <div id="nav">
    <div class="nav-bar-wrap">
      <div class="nav-banner">
        <NavLeft />
        <NavMiddle />
        <NavRight />
      </div>
      <div class="tab-wrap">
        <router-link to="/home" tag="span">首页</router-link>
        <router-link to="/choose" tag="span">选车</router-link>
        <span>车友圈</span>
        <span>小视频</span>
        <span>排行榜</span>
        <span>服务</span>
        <span>文章</span>
        <span>视频</span>
      </div>
    </div>
  </div>
</template>

<script>
import NavLeft from '@/components/Nav/NavLeft'
import NavMiddle from '@/components/Nav/NavMiddle'
import NavRight from '@/components/Nav/NavRight'
export default {
  components: {
    NavLeft,
    NavMiddle,
    NavRight
  }
}
</script>

<style lang="scss" scope>
.nav-bar-wrap {
  background: #333333;
  height: 1.92rem;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 100;
  .nav-banner {
    align-items: center;
    display: flex;
    height: 0.9rem;
    box-sizing: border-box;
    border-bottom: 1px solid #fff;
    padding: 0 0.2rem;
  }
  .tab-wrap {
    overflow: hidden;
    overflow-x: scroll;
    white-space: nowrap;
    line-height: 0.96rem;
    user-select: none;
    span {
      margin: 0 0.24rem;
      font-size: 0.32rem;
      color: #fff;
      padding-bottom: 0.1rem;
    }
    .router-link-active {
      border-bottom: 0.06rem solid #ffcd32;
      left: 50%;
      right: 0;
      content: '';
      height: 0.02rem;
      bottom: 0.16rem;
      width: 0.6rem;
    }
  }
}
</style>
